Menu Price file Import
Introduction
This will import menu price file to Cloud SQL for PostgreSQL
Fields
Column Position | Description | Datatype | Validation | Max length | Mandatory | Example |
A | IGNORE | |||||
B | IGNORE | |||||
C | Vehicle Id | Number | Numbers (0-9) | 5 | Y | 1 |
D | Repair short desc | String | A-Z characters | 20 | Y | Brakes |
E | Repair desc 1 | String | A-Z and 0-9 & All Special Characters | 100 | Y | Renew Front Brake Pads |
F | Repair desc 2 | String | A-Z and 0-9 & All Special Characters | 100 | Y | Standard |
G | Labour Time | Number | upto 2 decimals | 4 | Y | 0.8 |
H | Part number | String | A-Z and 0-9 & All Special Characters | 50 | Y | 1678168380 |
I | Part Name | String | A-Z and 0-9 & All Special Characters | 100 | Y | Brake Pads |
J | Part price | Number | upto 2 decimals | 7 | Y | 78.3 |
K | Part/fluid qty | Number | upto 2 decimals | 5 | Y | 1 |
L | IGNORE | |||||
M | Additional notes for parts | String | A-Z and 0-9 & All Special Characters | 300 | N | Some notes |
Importing Menu Price Files
This process imports menu price files from Modulus into the database. Modulus provides separate menu price files for Peugeot and Citroen brands.
Step 1: Preparation
Before importing new menu price data, you need to clear existing data and prepare the files:
1.1 Clear Existing Data
- Truncate the existing data in the
modulus_menu_price
table
1.2 Prepare Import Files
- You will receive two separate files from Modulus:
- One for Peugeot menu prices
- One for Citroen menu prices
- Important: Import both files one after the other (not simultaneously)
1.3 Upload Files to Storage
- Upload each file to the Google Cloud Storage bucket:
fnp-imports/modulus
- Required filename:
menu_price.csv
(rename each file to this exact name before uploading) - Process one brand at a time
Step 2: File Validation (Optional)
- Navigate to Cloud Scheduler
- Locate and run the Modulus_menu_price_validation job
- Note: Job name may vary slightly in different environments
Step 3: Import Process
- In the same Cloud Scheduler console
- Locate and run the Modulus_menu_price_import job
- Note: Job name may vary slightly in different environments
- Monitor the import job for completion
Step 4: Repeat for Second Brand
After successfully importing the first brand's file:
- Upload the second brand's file (rename to
menu_price.csv
) - Repeat Step 3 for the second file
- Ensure both Peugeot and Citroen menu price data are imported
Troubleshooting Memory Issues
⚠️ Memory Error Handling:
If you encounter a memory error like
Memory limit of 512 MiB exceeded with 515 MiB used
, follow these steps:
- Increase the memory allocation for the import service (above 512MB)
- Re-run the import job
- Revert the memory back to default (512MB) after successful import
Testing
- Data will be inserted to Cloud SQL for PostgreSQL under
fpn
database in tablemodulus_menu_price
.
Status: Accepted
Category: Protected
Authored By: Gladson on Jan 5, 2024
Revisions